package cn.wolfcode.mapper;

import cn.wolfcode.domain.Exam;
import cn.wolfcode.domain.Question;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExamMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Exam record);

    Exam selectByPrimaryKey(Long id);

    List<Exam> selectAll();

    int updateByPrimaryKey(Exam record);

    List<Question> selectQuestion(@Param("questionType") Integer questionType, @Param("questionAmount") Integer questionAmount);

    void insertTitleAndTime(Exam exam);

    void insertRandomQuestion(@Param("singleQuestion") List<Question> singleQuestion, @Param("examId") Long examId,@Param("everyQuestionScore")Integer everyQuestionScore);

    Exam selectExamPaperByExamId(Long id);
}